﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VisualWix
{
    public partial class WixProduct
    {
        public void Initialize()
        {
            //Product Defaults
            this.Id = Guid.NewGuid().ToString();
            this.Language = "1033";
            this.Manufacturer = "Philips";
            this.Name = "Product1";
            this.Version = "1.0.0";
            this.UpgradeCode = this.Id;

            //Package Defaults
            this.Package = new WixProductPackage();
            this.Package.Compressed = "yes";
            this.Package.Description = "Product1 Package Description";
            this.Package.InstallerVersion = "300";
            this.Package.InstallScope = "perMachine";
            this.Package.Platform = "x86";
            this.Package.InstallPrivileges = "limited";

            //Media Defaults
            this.Media = new WixProductMedia();
            this.Media.Id = "1";
            this.Media.Cabinet = "media1.cab";
            this.Media.EmbedCab = "yes";

            //UI Reference defaults
            this.UIRef = new WixProductUIRef[] { new WixProductUIRef { Id = "WixUI_Mondo" }, 
                                                new WixProductUIRef { Id = "WixUI_ErrorProgressText" } };

            this.Property = new WixProductProperty[0];

            this.MajorUpgrade = new WixProductMajorUpgrade();
            this.MajorUpgrade.DowngradeErrorMessage = "A newer version of [ProductName] is already installed.";

            this.Directory = new Directory();
            this.Directory.Id = "TARGETDIR";

            this.Feature = new WixProductFeature();
            this.Feature.Id = "ProductFullFeature";
            this.Feature.Title = "Complete Product";
            this.Feature.Level = "1";

        }
    }
}
